using SalesPages.DomainModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class SchoolSeoMap : EntityTypeConfiguration<SchoolSeo>
    {
        public SchoolSeoMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Locale)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.SchoolCode)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.Title1)
                .HasMaxLength(100);

            this.Property(t => t.Desc1)
                .HasMaxLength(2000);

            this.Property(t => t.Title2)
                .HasMaxLength(100);

            this.Property(t => t.Desc2)
                .HasMaxLength(2000);

            this.Property(t => t.Title3)
                .HasMaxLength(100);

            this.Property(t => t.Desc3)
                .HasMaxLength(2000);

            this.Property(t => t.DefaultPicName)
                .HasMaxLength(50);

            this.Property(t => t.DefaultPicDesc)
                .HasMaxLength(150);

            this.Property(t => t.PicName1)
                .HasMaxLength(50);

            this.Property(t => t.PicDesc1)
                .HasMaxLength(150);

            this.Property(t => t.PicName2)
                .HasMaxLength(50);

            this.Property(t => t.PicDesc2)
                .HasMaxLength(150);

            this.Property(t => t.PicName3)
                .HasMaxLength(50);

            this.Property(t => t.PicDesc3)
                .HasMaxLength(150);

            this.Property(t => t.PicName4)
                .HasMaxLength(50);

            this.Property(t => t.PicDesc4)
                .HasMaxLength(150);

            this.Property(t => t.PicName5)
                .HasMaxLength(50);

            this.Property(t => t.PicDesc5)
                .HasMaxLength(150);

            // Table & Column Mappings
            this.ToTable("SchoolSeo");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Locale).HasColumnName("Locale");
            this.Property(t => t.SchoolCode).HasColumnName("SchoolCode");
            this.Property(t => t.Title1).HasColumnName("Title1");
            this.Property(t => t.Desc1).HasColumnName("Desc1");
            this.Property(t => t.Title2).HasColumnName("Title2");
            this.Property(t => t.Desc2).HasColumnName("Desc2");
            this.Property(t => t.Title3).HasColumnName("Title3");
            this.Property(t => t.Desc3).HasColumnName("Desc3");
            this.Property(t => t.DefaultPicName).HasColumnName("DefaultPicName");
            this.Property(t => t.DefaultPicDesc).HasColumnName("DefaultPicDesc");
            this.Property(t => t.PicName1).HasColumnName("PicName1");
            this.Property(t => t.PicDesc1).HasColumnName("PicDesc1");
            this.Property(t => t.PicName2).HasColumnName("PicName2");
            this.Property(t => t.PicDesc2).HasColumnName("PicDesc2");
            this.Property(t => t.PicName3).HasColumnName("PicName3");
            this.Property(t => t.PicDesc3).HasColumnName("PicDesc3");
            this.Property(t => t.PicName4).HasColumnName("PicName4");
            this.Property(t => t.PicDesc4).HasColumnName("PicDesc4");
            this.Property(t => t.PicName5).HasColumnName("PicName5");
            this.Property(t => t.PicDesc5).HasColumnName("PicDesc5");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
        }
    }
}
